<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
  $("li").filter(":odd").hide().end().filter(":even").hover(function(){
	 $(this).toggleClass("active").next().slideToggle();
  });
  $("#bt2").click(function(){
	 alert($("#div4").text());
  });
  $("#bt1").click(function(){
	 var a = $("#div4");
	 a.animate({left:'100px'},"slow");
	 a.animate({height:'30px',width:'30px'},"slow");
	 a.animate({left:'200px'},"slow");
	 a.animate({height:'80px',width:'80px'},"slow");
	 a.animate({fontSize:'2em'});
	 a.animate({left:'8px'},"slow");
	 a.animate({width:'toggle'},3000);
  });
  $("#bt").click(function(){
	$("#div1").animate({left:'250px',opacity:'0.5',width:'100px',height:'+=20px'});
	$("#div4").animate({left:'200px'}).animate({height:'toggle'});
	$("#div2").fadeIn("slow");
    $("#div3").fadeTo(2000,0.3);
    $("#test").fadeIn(5000);
  });
  $("button").dblclick(function(){
	$("div.divv").hide(); 
  });
  $("#up").click(function(){
    $("#down").slideToggle("slow");
  });
  $("#bt4").click(function(){
	$("#formtest").submit();
  });
});
</script>
<style>
#up,#down
{
padding:5px;
border:solid 1px #cccccc;
background-color:#3ccccc;
text-align:center;
}
ul {
margin-left:20px;
color:red;
}
li {
cursor: default;
}
li.active {
background-color:black; 
}

</style>
</head>
<body>
<p>Demonstrate fadeIn() with different parameters.</p>
<button id="bt">Click to fade in boxes</button><br>
<button id="bt1">animate_div4</button>
<button id="bt2">attr_text_div4</button>
<br><br>
<div class="divv" id="div1" style="width:80px;height:80px;background-color:red;position:absolute;"></div>
<div class="divv" id="div4" style="width:80px;height:80px;background-color:yellow;position:absolute;">Go!</div>
<div class="divv" id="div2" style="width:80px;height:80px;display:none;background-color:green;"></div>
<div class="divv" id="div3" style="width:80px;height:80px;display:none;background-color:blue;"></div>
<div class="divv" id="test" style="width:80px;height:80px;display:none;background-color:skyblue;"></div>
<br><br><br><br><br>
<div id="up">up</div>
<div id="down" style="display:none;padding:50px;">down</div>
<ul>
   <li>1.test</li>
   <li>2.test</li>
   <li>3.test</li>
   <li>4.test</li>
   <li>5.test</li>
   <li>6.test</li>
</ul>
<form id="formtest" action="NewFile1.jsp">
 <input type="button" id="bt4" value="go">
</form>
</body>
</html>
